/*
 * @Date: 2024-04-24 14:50:45
 * @LastEditors: lyx
 * @LastEditTime: 2024-04-24 15:54:44
 * @FilePath: \taro-template3\src\packageA\components\ChatRedesignReport\result.tsx
 * @Description: 
 */
import React, { useState, useEffect } from "react";
import ChatRedesignReportModal from '../ChatRedesignReportModal'
import { Button } from "@nutui/nutui-react";

interface IProps {
  originData: any;
  onLoad?: () => void;
}

const ViewReport: React.FC<IProps> = ({ originData, onLoad }) => {
  const [open, setOepn] = useState<boolean>(false)
  useEffect(() => {
    onLoad && onLoad()
  }, [])
  return <>
    <div className='view-report'>
      <div className='view-report-l'>
        <div className='view-report-t'>装置体检报告</div>
        <div className='view-report-d'>{originData.createTime}</div>
      </div>
      <Button type="primary" onClick={() => {
        setOepn(true)
      }}>查看</Button>
    </div>
    <ChatRedesignReportModal open={open} formData={originData} onCancel={() => {
      setOepn(false)
    }}></ChatRedesignReportModal>
  </>
}

export default ViewReport;
